#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int a = 0;
	int b = 0;
	int s, y;
	scanf("%d %d", &a, &b);
	s = a / b;
	y = a % b;
	printf("%d %d", s, y);
	return 0;
}